package com.rock.securityresearch.domain

import java.time.LocalDate

case class DateRange(start: LocalDate, end: LocalDate)

object DateRange {
    def generate(rangeType: RangeType, range: DateRange): DateRange ={
        rangeType match
            case RangeType.Custom => range
            case RangeType.Days5 => DateRange(LocalDate.now().minusDays(10), LocalDate.now())
            case RangeType.Days20 => DateRange(LocalDate.now().minusDays(20 + 10), LocalDate.now())
            case RangeType.Days60 => DateRange(LocalDate.now().minusDays(60 + 30), LocalDate.now())
    }
}